import { Pipe, PipeTransform } from '@angular/core';

/**
 * 去除前后空格
 */
@Pipe({ name: 'trim' })
export class TrimPipe implements PipeTransform {
  transform(value): any {
    if (value) return value.trim();
    return '';
  }
}
